// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation.  All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------

#pragma once 

namespace Api
{
    ////
    //// FabricRuntime Interface Definitions Pointers
    ////
    class IRuntime;
    class IRuntime2;
    class IProcessExitHandler;
    class IStatelessServiceFactory;
    class IStatelessServiceInstance;
    class IStatelessServicePartition;
    class IStatefulServiceFactory;
    class IStatefulServiceReplica;
    class IStatefulServicePartition;
    class IStateProvider;
    class IStateReplicator;
    class IAtomicGroupStateReplicator;
    class IAtomicGroupStateProvider;
    class IReplicator;
    class IPrimaryReplicator;
    class IOperation;
    class IOperationData;
    class IOperationStream;
    class IOperationDataStream;
    class IServiceGroupFactory;
    class IServiceGroupFactoryBuilder;
    class IServiceGroupPartition;
    class ICodePackageActivationContext;
    class ICodePackageActivationContext2;
    class ICodePackageActivationContext3;
    class ICodePackage;
    class IConfigurationPackage;
    class IDataPackage;
    class ICodePackageChangeHandler;
    class IConfigurationPackageChangeHandler;
    class IDataPackageChangeHandler;
    class ITransactionBase;
    class ITransaction;
    class IKeyValueStoreReplica;
    class IKeyValueStoreItemEnumerator;
    class IKeyValueStoreItemMetadataEnumerator;
    class IKeyValueStoreItemResult;
    class IKeyValueStoreItemMetadataResult;
    class IStoreEventHandler;
    class IStorePostBackupHandler;
    class IKeyValueStoreReplicaFactory;
    class IQueryClient;
    class IClientSettings;
    class IClientFactory;
    class IInfrastructureService;
    class IInfrastructureServiceAgent;
    class IInfrastructureServiceAgentFactory;
    class IFaultAnalysisService;
    class IFaultAnalysisServiceAgent;
    class IBackupRestoreServiceAgentFactory;
    class IBackupRestoreHandler;
    class IBackupRestoreService;
    class IBackupRestoreServiceAgent;
    class IFaultAnalysisServiceAgentFactory;
    class IOrchestrationUpgradeStatusResult;
    class IUpgradeOrchestrationServiceStateResult;
    class IUpgradeOrchestrationService;
    class IUpgradeOrchestrationServiceAgent;
    class IUpgradeOrchestrationServiceAgentFactory;
    class IInvokeDataLossProgressResult;
    class IInvokeQuorumLossProgressResult;
    class IRestartPartitionProgressResult;
    class INodeTransitionProgressResult;
    class IChaosReportResult;
    class IMovePrimaryResult;
    class IMoveSecondaryResult;
    class IRestartDeployedCodePackageResult;
    class IRestartNodeResult;
    class IStartNodeResult;
    class IStopNodeResult;
    class IResolvedServicePartitionResult;
    class IServiceManagementClient;
    class IApplicationManagementClient;
    class IApplicationUpgradeProgressResult;
    class IUpgradeProgressResult;
    class IClusterManagementClient;
    class IRepairManagementClient;
    class IAccessControlClient;
    class IHealthClient;
    class IPropertyManagementClient;
    class IPropertyBatchResult;
    class IServiceGroupManagementClient;
    class IInfrastructureServiceClient;
    class IInternalInfrastructureServiceClient;
    class ITestManagementClient;
    class ITestManagementClientInternal;
    class IFaultManagementClient;
    class ITestClient;
    class ISecondaryEventHandler;
    class IStoreEnumerator;
    class IStoreItemEnumerator;
    class IStoreItemMetadataEnumerator;
    class IStoreNotificationEnumerator;
    class IStoreItem;
    class IStoreItemMetadata;
    class IClaimsTokenAuthenticator;
    class IFileStoreServiceClient;
    class IFileStoreServiceClientProgressEventHandler;
    class IInternalFileStoreServiceClient;
    class ITokenValidationService;
    class ITokenValidationServiceAgent;
    class ITokenValidationServiceAgentFactory;
    class INativeImageStoreClient;
    class INativeImageStoreProgressEventHandler;
    class IImageStoreClient;
    class IInternalTokenValidationServiceClient;
    class IServiceEndpointsVersion;
    class IServiceNotification;
    class IServiceNotificationEventHandler;
    class IClientConnectionEventHandler;
    class IEseLocalStoreSettingsResult;
    class IKeyValueStoreReplicaSettingsResult;
    class IKeyValueStoreReplicaSettings_V2Result;
    class ISharedLogSettingsResult;
    class IStatefulServiceReplicaStatusResult;
    class IServiceCommunicationClient;
    class IServiceConnectionEventHandler;
    class IServiceCommunicationListener;
    class IServiceCommunicationListenerFactory;
    class IServiceCommunicationClientFactory;
    class IClientConnection;
    class IServiceCommunicationMessageHandler;
    class IServiceConnectionHandler;
    class IServiceCommunicationTransport;
    class ICommunicationMessageSender;
    class IComposeManagementClient;
    class IDataLossHandler;
    class IContainerActivatorServiceAgent;
    class IContainerActivatorService;

    typedef Common::RootedObjectPointer<IRuntime> IRuntimePtr;
    typedef Common::RootedObjectPointer<IRuntime2> IRuntime2Ptr;
    typedef Common::RootedObjectPointer<IProcessExitHandler> IProcessExitHandlerPtr;
    typedef Common::RootedObjectPointer<IStatelessServiceFactory> IStatelessServiceFactoryPtr;
    typedef Common::RootedObjectPointer<IStatelessServiceInstance> IStatelessServiceInstancePtr;
    typedef Common::RootedObjectPointer<IStatelessServicePartition> IStatelessServicePartitionPtr;
    typedef Common::RootedObjectPointer<IStatefulServiceFactory> IStatefulServiceFactoryPtr;
    typedef Common::RootedObjectPointer<IStatefulServiceReplica> IStatefulServiceReplicaPtr;
    typedef Common::RootedObjectPointer<IStatefulServicePartition> IStatefulServicePartitionPtr;
    typedef Common::RootedObjectPointer<IStateProvider> IStateProviderPtr;
    typedef Common::RootedObjectPointer<IStateReplicator> IStateReplicatorPtr;
    typedef Common::RootedObjectPointer<IAtomicGroupStateReplicator> IAtomicGroupStateReplicatorPtr;
    typedef Common::RootedObjectPointer<IAtomicGroupStateProvider> IAtomicGroupStateProviderPtr;
    typedef Common::RootedObjectPointer<IReplicator> IReplicatorPtr;
    typedef Common::RootedObjectPointer<IPrimaryReplicator> IPrimaryReplicatorPtr;
    typedef Common::RootedObjectPointer<IOperation> IOperationPtr;
    typedef Common::RootedObjectPointer<IOperationData> IOperationDataPtr;
    typedef Common::RootedObjectPointer<IOperationStream> IOperationStreamPtr;
    typedef Common::RootedObjectPointer<IOperationDataStream> IOperationDataStreamPtr;
    typedef Common::RootedObjectPointer<IServiceGroupFactory> IServiceGroupFactoryPtr;
    typedef Common::RootedObjectPointer<IServiceGroupFactoryBuilder> IServiceGroupFactoryBuilderPtr;
    typedef Common::RootedObjectPointer<IServiceGroupPartition> IServiceGroupPartitionPtr;
    typedef Common::RootedObjectPointer<ICodePackageActivationContext> ICodePackageActivationContextPtr;
    typedef Common::RootedObjectPointer<ICodePackageActivationContext2> ICodePackageActivationContext2Ptr;
    typedef Common::RootedObjectPointer<ICodePackageActivationContext3> ICodePackageActivationContext3Ptr;
    typedef Common::RootedObjectPointer<ICodePackage> ICodePackagePtr;
    typedef Common::RootedObjectPointer<IConfigurationPackage> IConfigurationPackagePtr;
    typedef Common::RootedObjectPointer<IDataPackage> IDataPackagePtr;
    typedef Common::RootedObjectPointer<ICodePackageChangeHandler> ICodePackageChangeHandlerPtr;
    typedef Common::RootedObjectPointer<IConfigurationPackageChangeHandler> IConfigurationPackageChangeHandlerPtr;
    typedef Common::RootedObjectPointer<IDataPackageChangeHandler> IDataPackageChangeHandlerPtr;
    typedef Common::RootedObjectPointer<ITransactionBase> ITransactionBasePtr;
    typedef Common::RootedObjectPointer<ITransaction> ITransactionPtr;
    typedef Common::RootedObjectPointer<IKeyValueStoreReplica> IKeyValueStoreReplicaPtr;
    typedef Common::RootedObjectPointer<IKeyValueStoreItemEnumerator> IKeyValueStoreItemEnumeratorPtr;
    typedef Common::RootedObjectPointer<IKeyValueStoreItemMetadataEnumerator> IKeyValueStoreItemMetadataEnumeratorPtr;
    typedef Common::RootedObjectPointer<IKeyValueStoreItemResult> IKeyValueStoreItemResultPtr;
    typedef Common::RootedObjectPointer<IKeyValueStoreItemMetadataResult> IKeyValueStoreItemMetadataResultPtr;
    typedef Common::RootedObjectPointer<IStoreEventHandler> IStoreEventHandlerPtr;
    typedef Common::RootedObjectPointer<IStorePostBackupHandler> IStorePostBackupHandlerPtr;
    typedef Common::RootedObjectPointer<IKeyValueStoreReplicaFactory> IKeyValueStoreReplicaFactoryPtr;
    typedef Common::RootedObjectPointer<IQueryClient> IQueryClientPtr;
    typedef Common::RootedObjectPointer<IClientSettings> IClientSettingsPtr;
    typedef Common::RootedObjectPointer<IClientFactory> IClientFactoryPtr;
    typedef Common::RootedObjectPointer<IServiceManagementClient> IServiceManagementClientPtr;
    typedef Common::RootedObjectPointer<IResolvedServicePartitionResult> IResolvedServicePartitionResultPtr;
    typedef Common::RootedObjectPointer<IInfrastructureService> IInfrastructureServicePtr;
    typedef Common::RootedObjectPointer<IInfrastructureServiceAgent> IInfrastructureServiceAgentPtr;
    typedef Common::RootedObjectPointer<IInfrastructureServiceAgentFactory> IInfrastructureServiceAgentFactoryPtr;
    typedef Common::RootedObjectPointer<IFaultAnalysisService> IFaultAnalysisServicePtr;
    typedef Common::RootedObjectPointer<IFaultAnalysisServiceAgent> IFaultAnalysisServiceAgentPtr;
    typedef Common::RootedObjectPointer<IFaultAnalysisServiceAgentFactory> IFaultAnalysisServiceAgentFactoryPtr;
    typedef Common::RootedObjectPointer<IBackupRestoreHandler> IBackupRestoreHandlerPtr;
    typedef Common::RootedObjectPointer<IBackupRestoreService> IBackupRestoreServicePtr;
    typedef Common::RootedObjectPointer<IBackupRestoreServiceAgent> IBackupRestoreServiceAgentPtr;
    typedef Common::RootedObjectPointer<IBackupRestoreServiceAgentFactory> IBackupRestoreServiceAgentFactoryPtr;
    typedef Common::RootedObjectPointer<ITestManagementClient> ITestManagementClientPtr;
    typedef Common::RootedObjectPointer<ITestManagementClientInternal> ITestManagementClientInternalPtr;
    typedef Common::RootedObjectPointer<IFaultManagementClient> IFaultManagementClientPtr;
    typedef Common::RootedObjectPointer<IRestartNodeResult> IRestartNodeResultPtr;
    typedef Common::RootedObjectPointer<IStartNodeResult> IStartNodeResultPtr;
    typedef Common::RootedObjectPointer<IStopNodeResult> IStopNodeResultPtr;
    typedef Common::RootedObjectPointer<IRestartDeployedCodePackageResult> IRestartDeployedCodePackageResultPtr;
    typedef Common::RootedObjectPointer<IMovePrimaryResult> IMovePrimaryResultPtr;
    typedef Common::RootedObjectPointer<IMoveSecondaryResult> IMoveSecondaryResultPtr;
    typedef Common::RootedObjectPointer<IInvokeDataLossProgressResult> IInvokeDataLossProgressResultPtr;
    typedef Common::RootedObjectPointer<IInvokeQuorumLossProgressResult> IInvokeQuorumLossProgressResultPtr;
    typedef Common::RootedObjectPointer<IRestartPartitionProgressResult> IRestartPartitionProgressResultPtr;     
    typedef Common::RootedObjectPointer<IOrchestrationUpgradeStatusResult> IFabricOrchestrationUpgradeStatusResultPtr;
    typedef Common::RootedObjectPointer<IUpgradeOrchestrationServiceStateResult> IFabricUpgradeOrchestrationServiceStateResultPtr;
    typedef Common::RootedObjectPointer<IChaosReportResult> IChaosReportResultPtr;
    typedef Common::RootedObjectPointer<IUpgradeOrchestrationService> IUpgradeOrchestrationServicePtr;
    typedef Common::RootedObjectPointer<IUpgradeOrchestrationServiceAgent> IUpgradeOrchestrationServiceAgentPtr;
    typedef Common::RootedObjectPointer<IUpgradeOrchestrationServiceAgentFactory> IUpgradeOrchestrationServiceAgentFactoryPtr;
    typedef Common::RootedObjectPointer<INodeTransitionProgressResult> INodeTransitionProgressResultPtr;

    typedef Common::RootedObjectPointer<IApplicationManagementClient> IApplicationManagementClientPtr;
    typedef Common::RootedObjectPointer<IApplicationUpgradeProgressResult> IApplicationUpgradeProgressResultPtr;
    typedef Common::RootedObjectPointer<IUpgradeProgressResult> IUpgradeProgressResultPtr;
    typedef Common::RootedObjectPointer<IClusterManagementClient> IClusterManagementClientPtr;
    typedef Common::RootedObjectPointer<IRepairManagementClient> IRepairManagementClientPtr;
    typedef Common::RootedObjectPointer<IAccessControlClient> IAccessControlClientPtr;
    typedef Common::RootedObjectPointer<IFileStoreServiceClient> IFileStoreServiceClientPtr;
    typedef Common::RootedObjectPointer<IFileStoreServiceClientProgressEventHandler> IFileStoreServiceClientProgressEventHandlerPtr;
    typedef Common::RootedObjectPointer<IInternalFileStoreServiceClient> IInternalFileStoreServiceClientPtr;
    typedef Common::RootedObjectPointer<IHealthClient> IHealthClientPtr;
    typedef Common::RootedObjectPointer<IPropertyManagementClient> IPropertyManagementClientPtr;
    typedef Common::RootedObjectPointer<IPropertyBatchResult> IPropertyBatchResultPtr;
    typedef Common::RootedObjectPointer<IServiceGroupManagementClient> IServiceGroupManagementClientPtr;
    typedef Common::RootedObjectPointer<IInfrastructureServiceClient> IInfrastructureServiceClientPtr;
    typedef Common::RootedObjectPointer<IInternalInfrastructureServiceClient> IInternalInfrastructureServiceClientPtr;
    typedef Common::RootedObjectPointer<IImageStoreClient> IImageStoreClientPtr;
    typedef Common::RootedObjectPointer<ITestClient> ITestClientPtr;
    typedef Common::RootedObjectPointer<ISecondaryEventHandler> ISecondaryEventHandlerPtr;
    typedef Common::RootedObjectPointer<IStoreEnumerator> IStoreEnumeratorPtr;
    typedef Common::RootedObjectPointer<IStoreItemEnumerator> IStoreItemEnumeratorPtr;
    typedef Common::RootedObjectPointer<IStoreItemMetadataEnumerator> IStoreItemMetadataEnumeratorPtr;
    typedef Common::RootedObjectPointer<IStoreNotificationEnumerator> IStoreNotificationEnumeratorPtr;
    typedef Common::RootedObjectPointer<IStoreItem> IStoreItemPtr;
    typedef Common::RootedObjectPointer<IStoreItemMetadata> IStoreItemMetadataPtr;
    typedef Common::RootedObjectPointer<ITokenValidationService> ITokenValidationServicePtr;
    typedef Common::RootedObjectPointer<ITokenValidationServiceAgent> ITokenValidationServiceAgentPtr;
    typedef Common::RootedObjectPointer<ITokenValidationServiceAgentFactory> ITokenValidationServiceAgentFactoryPtr;
    typedef Common::RootedObjectPointer<INativeImageStoreClient> INativeImageStoreClientPtr;
    typedef Common::RootedObjectPointer<INativeImageStoreProgressEventHandler> INativeImageStoreProgressEventHandlerPtr;
    typedef Common::RootedObjectPointer<IInternalTokenValidationServiceClient> IInternalTokenValidationServiceClientPtr;
    typedef Common::RootedObjectPointer<IServiceEndpointsVersion> IServiceEndpointsVersionPtr;
    typedef Common::RootedObjectPointer<IServiceNotification> IServiceNotificationPtr;
    typedef Common::RootedObjectPointer<IServiceNotificationEventHandler> IServiceNotificationEventHandlerPtr;
    typedef Common::RootedObjectPointer<IClientConnectionEventHandler> IClientConnectionEventHandlerPtr;
    typedef Common::RootedObjectPointer<IEseLocalStoreSettingsResult> IEseLocalStoreSettingsResultPtr;
    typedef Common::RootedObjectPointer<IKeyValueStoreReplicaSettingsResult> IKeyValueStoreReplicaSettingsResultPtr;
    typedef Common::RootedObjectPointer<IKeyValueStoreReplicaSettings_V2Result> IKeyValueStoreReplicaSettings_V2ResultPtr;
    typedef Common::RootedObjectPointer<ISharedLogSettingsResult> ISharedLogSettingsResultPtr;
    typedef Common::RootedObjectPointer<IStatefulServiceReplicaStatusResult> IStatefulServiceReplicaStatusResultPtr;
    typedef Common::RootedObjectPointer<IServiceCommunicationMessageHandler> IServiceCommunicationMessageHandlerPtr;
    typedef Common::RootedObjectPointer<IServiceConnectionHandler> IServiceConnectionHandlerPtr;
    typedef Common::RootedObjectPointer<IServiceConnectionEventHandler> IServiceConnectionEventHandlerPtr;
    typedef Common::RootedObjectPointer<IServiceCommunicationListener> IServiceCommunicationListenerPtr;
    typedef Common::RootedObjectPointer<IServiceCommunicationClient> IServiceCommunicationClientPtr;
    typedef Common::RootedObjectPointer<IClientConnection> IClientConnectionPtr;
    typedef Common::RootedObjectPointer<IServiceCommunicationListenerFactory> IServiceCommunicationListenerFactoryPtr;
    typedef Common::RootedObjectPointer<IServiceCommunicationClientFactory> IServiceCommunicationClientFactoryPtr;
    typedef Common::RootedObjectPointer<ICommunicationMessageSender> ICommunicationMessageSenderPtr;
    typedef Common::RootedObjectPointer<IComposeManagementClient> IComposeManagementClientPtr;
    typedef Common::RootedObjectPointer<IDataLossHandler> IDataLossHandlerPtr;
    typedef Common::RootedObjectPointer<IContainerActivatorServiceAgent> IContainerActivatorServiceAgentPtr;
    typedef Common::RootedObjectPointer<IContainerActivatorService> IContainerActivatorServicePtr;

    typedef std::shared_ptr<IPrimaryReplicator> IPrimaryReplicatorSPtr;
    typedef std::shared_ptr<IStatefulServicePartition> IStatefulServicePartitionSPtr;
    typedef std::shared_ptr<IReplicator> IReplicatorSPtr;
    typedef std::shared_ptr<IStatefulServiceReplica> IStatefulServiceReplicaSPtr;
    typedef std::shared_ptr<IStateProvider> IStateProviderSPtr;
    typedef std::shared_ptr<IStateReplicator> IStateReplicatorSPtr;
    typedef std::shared_ptr<IOperationDataStream> IOperationDataStreamSPtr;
    typedef std::shared_ptr<IOperationData> IOperationDataSPtr;
    typedef std::shared_ptr<IKeyValueStoreReplica> IKeyValueStoreReplicaSPtr;
    typedef std::shared_ptr<ITransactionBase> ITransactionBaseSPtr;
    typedef std::shared_ptr<ITransaction> ITransactionSPtr;
    typedef std::shared_ptr<IKeyValueStoreItemResult> IKeyValueStoreItemResultSPtr;
    typedef std::shared_ptr<IKeyValueStoreItemMetadataResult> IKeyValueStoreItemMetadataResultSPtr;
    typedef std::shared_ptr<IKeyValueStoreItemEnumerator> IKeyValueStoreItemEnumeratorSPtr;
    typedef std::shared_ptr<IKeyValueStoreItemMetadataEnumerator> IKeyValueStoreItemMetadataEnumeratorSPtr;
    typedef std::shared_ptr<IInfrastructureService> IInfrastructureServiceSPtr;
    typedef std::shared_ptr<IInfrastructureServiceAgent> IInfrastructureServiceAgentSPtr;
    typedef std::shared_ptr<IClaimsTokenAuthenticator> IClaimsTokenAuthenticatorSPtr;
    typedef std::shared_ptr<ITokenValidationService> ITokenValidationServiceSPtr;
    typedef std::shared_ptr<IServiceEndpointsVersion> IServiceEndpointsVersionSPtr;
    typedef std::shared_ptr<IServiceNotification> IServiceNotificationSPtr;
    typedef std::shared_ptr<IServiceNotificationEventHandler> IServiceNotificationEventHandlerSPtr;
    typedef std::shared_ptr<IClientConnectionEventHandler> IClientConnectionEventHandlerSPtr;
    typedef std::shared_ptr<IEseLocalStoreSettingsResult> IEseLocalStoreSettingsResultSPtr;
    typedef std::shared_ptr<IKeyValueStoreReplicaSettingsResult> IKeyValueStoreReplicaSettingsResultSPtr;
    typedef std::shared_ptr<IKeyValueStoreReplicaSettings_V2Result> IKeyValueStoreReplicaSettings_V2ResultSPtr;
    typedef std::shared_ptr<ISharedLogSettingsResult> ISharedLogSettingsResultSPtr;
    typedef std::shared_ptr<IStatefulServiceReplicaStatusResult> IStatefulServiceReplicaStatusResultSPtr;
    typedef std::shared_ptr<IServiceCommunicationTransport> IServiceCommunicationTransportSPtr;
    typedef std::weak_ptr<IServiceCommunicationTransport> IServiceCommunicationTransportWPtr;
}
